package com.vshining.cryptoki.jna.pkcs11t;

import com.sun.jna.NativeLong;
import com.sun.jna.Structure;

import java.util.Arrays;
import java.util.List;

/**
 * @author Shining Wang <shiningwang@vshining.com>
 */
@SuppressWarnings("unused")
public class CK_SESSION_INFO extends Structure {
    public NativeLong slotID;
    public NativeLong state;
    public NativeLong flags;
    public NativeLong ulDeviceError;

    @Override
    protected List getFieldOrder() {
        return Arrays.asList(
                "slotID",
                "state",
                "flags",
                "ulDeviceError"
        );
    }

    public static final long CKF_RW_SESSION = 0x00000002L;
    public static final long CKF_SERIAL_SESSION = 0x00000004L;

}
